package com.wwwarehouse.resource_center.bean.goods;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Joseph on 2017/10/21.
 *         <p/>
 *         选择单位
 */

public class SelectionUnitBean implements Parcelable {

    private List<EmptyIdentifierBean> emptyIdentifier;

    public List<EmptyIdentifierBean> getEmptyIdentifier() {
        return emptyIdentifier;
    }

    public void setEmptyIdentifier(List<EmptyIdentifierBean> emptyIdentifier) {
        this.emptyIdentifier = emptyIdentifier;
    }

    public static class EmptyIdentifierBean implements Parcelable {
        /**
         * comment : 单位注释
         * ownerUkid : 定义的业务单位(引用业务单位ukid)
         * unitCharacter : 单位符号
         * unitCode : 单位code
         * unitName : 单位名称
         * unitUkid : 主键
         */

        private String comment;
        private String ownerUkid;
        private String unitCharacter="";
        private String unitCode;
        private String unitName;
        private String unitUkid;

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        public String getOwnerUkid() {
            return ownerUkid;
        }

        public void setOwnerUkid(String ownerUkid) {
            this.ownerUkid = ownerUkid;
        }

        public String getUnitCharacter() {
            return unitCharacter;
        }

        public void setUnitCharacter(String unitCharacter) {
            this.unitCharacter = unitCharacter;
        }

        public String getUnitCode() {
            return unitCode;
        }

        public void setUnitCode(String unitCode) {
            this.unitCode = unitCode;
        }

        public String getUnitName() {
            return unitName;
        }

        public void setUnitName(String unitName) {
            this.unitName = unitName;
        }

        public String getUnitUkid() {
            return unitUkid;
        }

        public void setUnitUkid(String unitUkid) {
            this.unitUkid = unitUkid;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.comment);
            dest.writeString(this.ownerUkid);
            dest.writeString(this.unitCharacter);
            dest.writeString(this.unitCode);
            dest.writeString(this.unitName);
            dest.writeString(this.unitUkid);
        }

        public EmptyIdentifierBean() {
        }

        protected EmptyIdentifierBean(Parcel in) {
            this.comment = in.readString();
            this.ownerUkid = in.readString();
            this.unitCharacter = in.readString();
            this.unitCode = in.readString();
            this.unitName = in.readString();
            this.unitUkid = in.readString();
        }

        public static final Creator<EmptyIdentifierBean> CREATOR = new Creator<EmptyIdentifierBean>() {
            @Override
            public EmptyIdentifierBean createFromParcel(Parcel source) {
                return new EmptyIdentifierBean(source);
            }

            @Override
            public EmptyIdentifierBean[] newArray(int size) {
                return new EmptyIdentifierBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeList(this.emptyIdentifier);
    }

    public SelectionUnitBean() {
    }

    protected SelectionUnitBean(Parcel in) {
        this.emptyIdentifier = new ArrayList<EmptyIdentifierBean>();
        in.readList(this.emptyIdentifier, EmptyIdentifierBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<SelectionUnitBean> CREATOR = new Parcelable.Creator<SelectionUnitBean>() {
        @Override
        public SelectionUnitBean createFromParcel(Parcel source) {
            return new SelectionUnitBean(source);
        }

        @Override
        public SelectionUnitBean[] newArray(int size) {
            return new SelectionUnitBean[size];
        }
    };
}
